<template>
  <cj-dialog :isShow="isShowAD" :option="option" @closeDialog="closeDialog">
    <section class="c-w70 c-p c-maxw640">
      <img class="c-w100" :class="adLink ? '':'app-save-img'" :src="$addXossFilter(imgAd)" alt="" @click="clickAd" />
      <i @click="closeDialog" class="iconfont c-fs44 c-fc-white c-pa" style="top:-1.5rem;right:-1.5rem;">&#xe84e;</i>
    </section>
  </cj-dialog>
</template>
<script>
import cjDialog from '@/plugin/cjDialog/cjDialog.vue';
import { appRouterChange } from "@/mixin/appRouterPush.js";
export default {
  mixins: [appRouterChange],
  components: {
    cjDialog,
  },
  props: {
    imgAd: {
      type: String,
      default: ""
    },
    adLink: {
      type: String,
      default: ""
    },
    isShowAD: {
      type: Boolean,
      default: false
    },
  },
  data() {
    return {
      option:{
        closeOnClickMasker: true,
        showMasker: true,
        zIndex: 9999,
        backgroundColor:'rgba(0, 0, 0, 0.8)',
      }
    };
  },
  methods: {
    closeDialog() {
      this.$emit('update:isShowAD', false)
    },
    //点击广告
    clickAd() {
      if (this.adLink) {
        this.goTargetUrl(this.adLink);
      }
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
